#{extends 'frame.html' /}

#{set title:'卖家任务详情-收藏加购' /}



#{set 'moreStyles'}

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/task-detail.css'}" />

<link rel="stylesheet" media="screen" href="@{'/public/stylesheets/jquery.pagination.css'}" />

#{/set}



<div id="taskInfoCols" class="clearfix">

	<div class="contentCard leftPart floatLeft">

		<div class="contentTitle">

			<span class="iconfont">&#xf0142;</span>

			任务信息

		</div>

		<div class="contentBody">
		<div class="panelLine">

				<span class="lbl">任务模型</span>

				<span class="mr-4 orange">${task.model.title}</span>

			</div>

		<div class="panelLine">

				<span class="lbl">任务类型</span>

				<span class="mr-4 orange">${task.type.title}</span>

			</div>

			<div class="panelLine">

				<span class="lbl">任务总数</span>

				<span class="mr-4 orange">${task.totalOrderNum}</span>

				<span>单</span>

			</div>

			<div style="padding-left:20px;">

				#{if task.pcOrderNum>0}

				<div class="panelLine">

					<span class="grey mr-8">

						<span class="iconfont">&#xf0099;</span>

						电脑端

					</span>

					<span class="mr-4 orange">${task.pcOrderNum}</span>

					<span>单</span>

				</div>

				<div class="panelLine">

					<span class="mr-4">进行中</span>

					<span class="mr-4 orange">${task.pcTakenCount-pcFinishedCount}</span>

					<span class="mr-4">未接手</span>

					<span class="mr-4 red">${task.pcOrderNum-task.pcTakenCount}</span>

					<span class="mr-4">已完成</span>

					<span class="mr-4 green">${pcFinishedCount}</span>

				</div>

				#{/if}

				#{if task.mobileOrderNum>0}

				<div class="panelLine">

					<span class="grey mr-8">

						<span class="iconfont">&#xf00a2;</span>

						移动端

					</span>

					<span class="mr-4 orange">${task.mobileOrderNum}</span>

					<span>单</span>

				</div>

				<div class="panelLine">

					<span class="mr-4">进行中</span>

					<span class="mr-4 orange">${task.mobileTakenCount-mobileFinishedCount}</span>

					<span class="mr-4">未接手</span>

					<span class="mr-4 red">${task.mobileOrderNum-task.mobileTakenCount}</span>

					<span class="mr-4">已完成</span>

					<span class="mr-4 green">${mobileFinishedCount}</span>

				</div>

				#{/if}

			</div>

			<hr/>

			<div class="panelLine">

				<span class="lbl">店铺</span>

				<span>${task.shopName}</span>

			</div>

			<div class="panelLine">

				<span class="lbl">任务编号</span>

				<span id="taskId">${task.id}</span>

			</div>

			#{if task.publishTime}

			<div class="panelLine">

				<span class="lbl">发布时间</span>

				<span>${task?.publishTime?.format("yyyy-MM-dd hh:mm:ss")}</span>

			</div>

			#{/if}

			<hr/>

			<div class="panelLine">

				<span class="lbl">商品搜索关键词</span>

				<span class="mr-4 orange">${task.searchPlans?.size()}</span>

				<span>个</span>

			</div>

			<div style="padding-left:20px;">

				<div class="panelLine">

					<span class="grey mr-8">

						淘宝搜索关键词

					</span>

				</div>

				#{list items:task.searchPlans, as:'p'}

				#{if p.inTmall}

				#{/if}

				#{else}

				<div class="panelLineNoHeight">

					<span class="mr-4">${p.word}</span>

					<span class="mr-4">${p.totalNum}单</span>

					<span class="mr-4">${p.flowNum}流量</span>

					<span class="mr-4 orange">${p.skus}</span>

				</div>

				#{/else}

				#{/list}

				<div class="panelLine">

					<span class="grey mr-8">

						天猫搜索

					</span>

				</div>

				#{list items:task.searchPlans, as:'p'}

				#{if p.inTmall}

				<div class="panelLineNoHeight">

					<span class="mr-4">${p.word}</span>

					<span class="mr-4">${p.totalNum}单</span>

					<span class="mr-4">${p.flowNum}流量</span>

					<span class="mr-4 orange">${p.skus}</span>

				</div>

				#{/if}

				#{/list}

			</div>

			<!-- tcode -->
			#{if task.model.toString()=='CAC'&&task.type.toString()=='JHS'}
			<hr/>
			<div class="panelLineNoHeight">

				<span class="a lbl">淘口令</span>

				<div style="margin-left:25px;width:240px">${task.tcode}</div>

			</div>
			<div class="panelLineNoHeight">

				<span class="a lbl">二维码</span>
				<div style="margin-left:25px;width:240px">
					#{if task.qrImgUrl!=null&&task.qrImgUrl != ''}
						<img src="${task.qrImgUrl}" />
					#{/if}
				</div>
			</div>
			#{/if}
			<hr/>
			<div class="panelLine">

			<span class="a lbl">价格筛选范围</span>

				<span class="mr-4 orange">${task.itemSearchMinPrice}</span>元~<span class="mr-4 orange">${task.itemSearchMaxPrice}</span>元

			</div>

			<div class="panelLine">

				<span class="a lbl">地区</span>

				<span id="itemSearchLocation">${task.itemSearchLocation}</span>

			</div>

			<hr/>

			<div class="panelLineNoHeight">

				<span class="a lbl">留言</span>

				<span id="orderMessages">${task.orderMessages}</span>

			</div>

			<hr/>

			<div class="panelLineNoHeight">
				
				
				<span class="a lbl">商家特殊要求:</span>

				<span id="taskRequest">${task.taskRequest}</span>
				
			</div>

			<hr/>

			<div class="panelLine">
				<span  class="a lbl">买手性别要求：</span> <span>${task.genderConfig}</span>
			</div>
		
			<div class="panelLine">
				<span  class="a lbl">买手位置要求：</span><span>${task.buyerLocationConfig}</span>	
			</div>

			<div class="panelLine">
				
				
				
				
				<span class="a lbl">延时发布时长</span>

				<span id="orderMessages" class="mr-4 orange">${task.delaySpan}</span>

				<span>分钟</span>

			</div>

			<div class="panelLine">

				<span class="a lbl">定时发布时长</span>

				<span id="orderMessages" class="mr-4 orange">${task.publishTimerInterval}</span>

				<span>分钟</span>

			</div>

			<div class="panelLine">

				<span class="a lbl">每次发布任务单数</span>

				<span id="orderMessages" class="mr-4 orange">${task.publishTimerValue}</span>

				<span>单</span>

			</div>

			#{if task.model.toString()=='ORDER'}
			<hr/>

			<div class="panelLine">

				<span class="a lbl">是否包邮</span>

				<span id="orderMessages" class="mr-4 orange">${task.isFreeShipping==true?'包邮':'不包邮'}</span>

			</div>

			<div class="panelLine">

				<span class="a lbl">是否为平台快递</span>

				<span id="orderMessages" class="mr-4 orange">${task.expressType.title}</span>

			</div>

			#{/}

		</div>

	</div>

	<div class="contentCard ${task.sysRefund?'withdrawImg':''}">

		<div class="contentTitle">

			<span class="iconfont">&#xf0025;</span>

			任务状态明细

		</div>

		<div class="contentBody delt-info" style="height:395px;">

			<div class="state">

				<h4>任务状态：<span class="mr-20">${task.status.title}</span></h4>

				<hr/>

				#{if task.finishedCount < task.totalOrderNum }

				<p class="mb">

					<span class="mr-20">买手已付款，待发货</span>

					<span class="green">(0)</span>个

				</p>

				<p class="mb">

					<span class="mr-20">买手已收货好评，待返还本金</span>

					<span class="green">(0)</span>个

				</p>

				<p class="mb">

					<span class="mr-20">任务发布时间：</span>

					<span class="green" id="publishTime">${publishTime}</span>

				</p>

				#{/if}

				*{#{if task.pcTakenCount+task.mobileTakenCount < task.totalOrderNum}

				<p class="mb">

					<span class="mr-8">您还可以</span>

					<a href="javascript:;" class="stdColorButton">撤销未接手任务&nbsp;

					${task.totalOrderNum-task.pcTakenCount-task.mobileTakenCount }&nbsp;单</a>

				</p>

				#{/if}*

			</div>

		</div>

	</div>

</div>



<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#x3434;</span>

		子任务列表

		<a href="javascript:;" class="ml20 inputCheckBox inputCheckBox-checked" id="ckShowtCancledTask">&nbsp;</a>

		<span>显示已取消的任务</span>

		<span class="floatRight">

			<form id="exportForm" action="${role=='admin'?'/admin':'/seller'}/task/export/${task?.id}/${task.sysRefund}" method="post">

				#{authenticityToken /}

				<span class="mr-20" >

					<input type="button" class="bold red" value=" 导出买手任务 " id="btnExportCsv"/>

				</span>

			</form>

		</span>

	</div>

	<div class="contentBody" id="subOrderPanel">

		<table class="normTable">

			<thead>

				<tr>

					<td class="" width="13%">买号</td>
					<td class="" width="13%">手机号</td>

					<td class="" width="13%">下单终端</td>

					<td class="" width="13%">订单号</td>

					<td class="" width="13%">状态</td>

					<td class="" width="13%">快递信息</td>

					<td class="" width="9%">退款金额</td>

					#{if !task.sysRefund}

					<td class="" width="13%">退款账号</td>

					#{/if}

				</tr>

			</thead>

			<tbody id="taskContainer"></tbody>

		</table>

		<div id="noMsg"><div class="warnBox"><span class="iconfont">&#xf00b6;</span>没有任务!</div></div>

		<!-- 分页区域-->

		<div class="pagin-btm clearFix">

			<div class="pagination"></div>

		</div>

	</div>

</div>



#{if task?.itemSubwayPic}			

<div class="contentCard">

	<div class="contentTitle">

		直通车图片

	</div>

	<div class="contentBody">

		<div id="itemInfo" class="clearfix">

		#{list items:task?.itemSubwayPic?.split(','), as:'cw'}

				<img  class="floatLeft ml20" width="200" height="200"  src="${cw}">

		#{/list}

		</div>

	</div>

</div>

#{/if }

<div class="contentCard">

	<div class="contentTitle">

		商品信息

	</div>

	<div class="contentBody">

		<div id="itemInfo" class="clearfix">

			<div class="picBox floatLeft">

				<img src="${task.itemPic}" />

			</div>

			<div class="contInfo floatLeft">

				<p class="title">${task.itemTitle}</p>

				<div>

				<p id="urlMsg">${task.itemUrl}</p>

				<a class="grey" id="copyUrl" href="javascript:;" >[点击复制]</a>

				</div>

				<div class="price-box pt10">

					<span class="mr-4 lb">单价(元)</span>

					<span class="black val">${task.itemPrice/100}</span>

					<span class="mr-4 lb">数量</span>

					<span class="black val">${task.itemBuyNum}</span>

				</div>

			</div>

			<div class="summary floatLeft">

				<div>小计</div>

				<br/>

				<div class="orange sum">${task.itemPrice/100*task.itemBuyNum}</div>

			</div>

		</div>

	</div>

</div>





<div class="contentCard">

	<div class="contentTitle">

		优质评价

	</div>

	<div class="contentBody">

		<div id="itemInfo" class="clearfix">

			<div class="contInfo floatLeft">

				<div class="price-box pt10">

					<span class="mr-4 lb">评价关键词</span>

					<span class="black val"><span class="red">${task.goodCommentWords}</span></span>

					

				</div>

				#{if task?.goodCommentImg}

				<div class="price-box pt10">

					<span class="mr-4 lb">评价图片</span>

				<br/>

				#{list items:task?.goodCommentImg?.split(','), as:'cw'}

							<img id="imgComment1" class="floatLeft ml20" width="200" height="200" name="imgComment1" src="${cw}">

					#{/list}

					

				</div>

				#{/if }

			</div>

			

		</div>

	</div>

</div>



<div class="contentCard">

	<div class="contentTitle">

		<span class="iconfont">&#xf0179;</span>

		费用明细

	</div>

	<div class="contentBody" id="feePanel">

		<table class="normTable">

			<thead>

				<tr>

					<td width="15%" class="item">分类</td>

					<td width="30%" class="item">费用明细</td>

					<td width="15%">小计</td>

					<td width="20%">合计</td>

					<td width="20%">备注</td>

				</tr>

			</thead>

			<tbody>

				<tr>

					<td class="green item">押金</td>

					<td class="item">

						押金：

						<span class="red">${task.pledge/100}</span>元/单

					</td>

					<td>

						<span class="mr-4 red">${task.pledge/100}</span>元

					</td>

					<td>${task.pledge/100} X ${task.totalOrderNum}=${task.totalPledge/100}元</td>

					<td></td>

				</tr>

				<tr>

					<td class="green item">金币</td>

					<td class="item">

						套餐服务费：

						<span class="red">${(task.totalIngot-task.vasIngot)/100}</span>

						金币

					</td>

					<td>

						<span class="mr-4 red">${(task.totalIngot-task.vasIngot)/100}</span>

						金币

					</td>

					<td>

						<span class="mr-4 red">${(task.totalIngot-task.vasIngot)/100}</span>

						金币</td>

					<td></td>

				</tr>

				<tr>

					<td class="green item">增值服务</td>

					<td class="item">

						<ul>


						#{if task.genderConfig}
							<li>买手性别设置：<span class="mr-4 red">${task.genderIngot} X ${task.totalOrderNum}</span>金币</li>
						#{/if}
						
						#{if task.buyerLocationConfig}
							<li>买手区域设置：<span class="mr-4 red">${task.buyerLocationIngot} X ${task.totalOrderNum}</span>金币</li>
						#{/if}
						#{if task.collectionType}
							<li>收藏加购设置：<span class="mr-4 red">${task.collectionIngot} X ${task.totalOrderNum}</span>金币</li>
						#{/if}

						#{if task.speedTaskIngot>0}

							<li>

								提升完成任务速度：

								<span class="mr-4 red">${task.speedTaskIngot}</span>

								金币

							</li>

						#{/if}

						#{if task.speedExamine}

							<li>

								优先审核：

								<span class="mr-4 red">5</span>

								金币

							</li>

						#{/if}

						#{if task.extraRewardIngot>0}

							<li>

								加赏任务佣金：

								<span class="mr-4 red">${task.extraRewardIngot}</span>

								金币/单

							</li>

						#{/if}

						#{if task.publishTimerInterval>0}

							<li>

								任务发布间隔：

								<span class="mr-4 red">5</span>

								金币

							</li>

						#{/if}

						#{if task.buyTimeInterval>0}

							<li>

								更安全购物周期：

								<span class="mr-4 red">${task.buyTimeInterval}</span>

								金币/单

							</li>

						#{/if}
							<li>
							 平台服务费
							 <span class="mr-4 red">0.2</span>
							 金币/单
							</li>
						</ul>

					</td>

					<td>

						<span class="mr-4 red">${task.vasIngot/100}</span>

						金币

					</td>

					<td>

					<span class="mr-4 red">${task.vasIngot/100}</span>

						金币

					</td>

					<td></td>

				</tr>

			</tbody>

		</table>



		<div class="secondTile">

			费用总计&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;

			<span class="ls ">

				押金：

				<span class="red bold spRow-total-1 mr4 ml4 ">${task.totalPledge/100}</span>

				元，金币：

				<span class="red bold spRow-total-4 mr4 ml4 ">${task.totalIngot/100}</span>

				个

			</span>

		</div>

	</div>

</div>



<!-- 子任务列表模板 -->

<textarea id="taskTemp" class="muban">

	{{#results}}

	<tr>

		<td>{{buyerAccountNick}}</td>
		<td>{{buyerMobile}}</td>
		<td>

			<span class="iconfont">{{{deviceCss}}}</span>

			{{deviceTitle}}

		</td>

		<td>

			<span>{{orderId}}</span>

			<br/>

			#{if role=='admin'}

			<a href="/admin/buyerTask/{{id}}" target="_blank" class="view-detail blue">查看详情&gt;&gt;</a>

			#{/if}

			#{else}

			<a href="/buyer/task/{{id}}" target="_blank" class="view-detail blue">查看详情&gt;&gt;</a>

			#{/else}

		</td>

		<td status="{{status}}">{{statusTitle}}</td>

		<td>

			<span>{{expressNo}}</span>

		</td>

		<td>{{paidFeeStr}}元</td>

		#{if !task.sysRefund}

		<td>

			<span>{{refundAccount.typeName}}</span>

			<br/>

			<span>{{refundAccount.no}}</span>

		</td>

		#{/if}

	</tr>

	{{/results}}

</textarea>

#{set 'moreScripts'}

<script src="@{'/public/javascripts/jquery.pagination.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/mustache.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.number.min.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/jquery.zclip.js'}" type="text/javascript"></script>

<script src="@{'/public/javascripts/task/taskDetail.js'}" type="text/javascript"></script>

<script type="text/javascript">

    App.module = '${role=='admin'?'tasklist':''}';

	App.userRole = '${role}';

	App.isSysRefundTask = ${task.sysRefund};

</script>

#{/set}